﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using Model.Entity;
using Ones.Infrastructure.Utils.Pagination.Impl;

namespace Ones.Wcf.WebAdministration
{
    [ServiceContract]
    public interface IServiceCommentManagement
    {
        #region Comment
        
        #region DMM
        
        [OperationContract]
        Boolean writeComment(Comment cmt);
        
        [OperationContract]
        Boolean updateComment(Comment cmt);
        
        [OperationContract]
        Boolean deleteComment(int cmtId);
        
        [OperationContract]
        Boolean allowComment(int cmtId);
        
        [OperationContract]
        Boolean disallowComment(int cmtId);
        
        #endregion
        
        #region DQM
        
        [OperationContract]
        List<Comment> searchAllComments();
        
        [OperationContract]
        List<Comment> searchCommentByNews(int id);
        
        [OperationContract]
        List<Comment> searchCommentByIllegal(Boolean isIllegal);
        
        [OperationContract]
        List<Comment> searchAllLatestComments();
        
        [OperationContract]
        List<Comment> searchLatestCommentByNews(int id);
        
        [OperationContract]
        List<Comment> searchLatestCommentByIllegal(Boolean isIllegal);
    
        #endregion

        #endregion
        
        #region ///Paging///
        
        [OperationContract]
        LazyPagination<Comment> pagingAllComments(int pageNumber, int pageSize);
        
        [OperationContract]
        LazyPagination<Comment> pagingCommentByNews(int id, int pageNumber, int pageSize);
        
        [OperationContract]
        LazyPagination<Comment> pagingCommentByIllegal(Boolean isIllegal, int pageNumber, int pageSize);
        
        [OperationContract]
        LazyPagination<Comment> pagingAllLatestComments(int pageNumber, int pageSize);
        
        [OperationContract]
        LazyPagination<Comment> pagingLatestCommentByNews(int id, int pageNumber, int pageSize);
        
        [OperationContract]
        LazyPagination<Comment> pagingLatestCommentByIllegal(Boolean isIllegal, int pageNumber, int pageSize);

        #endregion
    }
}